<div class="results">
    <?php if (0 >= $count): ?>
        <p class="noarticle"><?php echo Yii::t('app', 'Записи не найдены'); ?></p>
    <?php else: ?>
        <div class="firms-pager clearfix">
            <?php
                $this->widget('CLinkPager', array(
                    'pages' => $pages,
                    'header' => Yii::t('app', 'Постраничная навигация'),
                    'firstPageLabel' => '&laquo;',
                    'prevPageLabel' => '&lsaquo;',
                    'nextPageLabel' => '&rsaquo;',
                    'lastPageLabel' => '&raquo;'
                ));
            ?>
        </div>
        
        <ul class="firms-list">
            <?php foreach($firms as $firm) { 
                $firm_url = $this->createUrl('firm/index', array('id' => $firm->id, 'slug' => $firm->slug));
            ?>
                <li>
                    <p><span><b><?php echo GxHtml::encode($firm->rubric->name);?></b>&nbsp;<?php echo GxHtml::encode($firm->category->name);?><span></p>
                    <?php if (0 < $firm->firmTmpl->logo_flag && '' != $firm->logo) : ?>
                    <a href="<?php echo $firm_url; ?>" class="image-wrapper">
                        <?php echo $firm->logo ? GxHtml::image($this->getFirmImgSrc($firm->logo, 'firms_img_logo'), 'logo', array('class' => 'firm-logo')) : '';?>
                    </a>
                    <?php endif;?>
                    <div class="inner clearfix">
                        <h4><a href="<?php echo $firm_url; ?>" ><?php echo GxHtml::encode($firm->title); ?></a></h4>
                        <div class="wysiwyg"><?php echo GxHtml::truncate(GxHtml::smart_encode($firm->description)); ?></div>
                        <a class="ll-link medium box" href="<?php echo $firm_url; ?>"><?php echo Yii::t('app', 'Просмотр');?></a>
                    </div>
                </li>
            <?php } ?>
        </ul>
        
        <div class="firms-pager clearfix">
            <?php
                $this->widget('CLinkPager', array(
                    'pages' => $pages,
                    'header' => Yii::t('app', 'Постраничная навигация'),
                    'firstPageLabel' => '&laquo;',
                    'prevPageLabel' => '&lsaquo;',
                    'nextPageLabel' => '&rsaquo;',
                    'lastPageLabel' => '&raquo;'
                ));
            ?>
        </div>
    <?php endif; ?>
</div>